package com.bmps.springcloud.insuredmicroservice.model.accept.response;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * @author lyw
 * @date 2019-08-06 13:46:27
 */
public class ErrorListModel implements Serializable {
    @XStreamAlias("Error")
    private List<ErrorModel> error;

    public List<ErrorModel> getError() {
        return error;
    }

    public void setError(List<ErrorModel> error) {
        this.error = error;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()){
            return false;
        }

        ErrorListModel that = (ErrorListModel) o;

        return new EqualsBuilder()
                .append(error, that.error)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(error)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "ErrorListModel{" +
                "error=" + error +
                '}';
    }
}
